package appli;

import neurons.Function;
import neurons.FunctionInterface;
import neurons.In;
import neurons.MyNeuronTypes;
import neurons.Neuron;
import neurons.NeuronInterface;
import neurons.NullNeuron;
import neurons.Out;

public class NeuronFactory implements NeuronFactoryInterface {

	@Override
	public NeuronInterface create(MyNeuronTypes type) {
		switch (type) {
		case IN:
			return new In();

		case MIDDLE:
			FunctionInterface function = new Function();
			return new Neuron(function);

		case OUT:
			return new Out();
		default:
			return new NullNeuron();
		}
	}
}
